package simple.example;

class OuterClass
{
	private static final int Size = 10; 
	private int count = 0;
	private int[] IntigerArray = {5, 13, 8, 89, 52, 24, 65, 80, 34, 26 };
	
	InnerClass InnerObject = new InnerClass();
	
	class InnerClass
	{
		public boolean CheckEnd()
		{
			return (count++ <= Size-1);
		}
		
		public void SetArray()
		{
			int TempElement = 0,next = 0;
			while(next < (Size - count))
			{
				try{
				if(IntigerArray[next] > IntigerArray[next+1])
				{
					TempElement 		 = IntigerArray[next];
					IntigerArray[next]   = IntigerArray[next+1];
					IntigerArray[next+1] = TempElement; 
				}
				}catch (Exception e) {
					e.printStackTrace();
				}
				next++;
			}
		}
	}
	
	public void SortArray()
	{
		while(InnerObject.CheckEnd())
			InnerObject.SetArray();
			
		for(count = 0; count < Size; count++)
			System.out.print(IntigerArray[count] + " ");
	}
	
	
}


class CallInnerClass 
{
	public static void main(String[] args)
	{
		OuterClass OuterObject = new OuterClass();
		OuterObject.SortArray();
	}
}
